//
//  main.m
//  02-Fraction
//
//  Created by dllo on 16/7/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Fraction.h"
int main(int argc, const char * argv[]) {
    @autoreleasepool {
        
        Fraction *fr1 = [[Fraction alloc] initWitnMember:1 denominator:3];
        Fraction *fr2 = [[Fraction alloc] initWitnMember:3 denominator:5];
        //NSArray *arr = [[NSArray alloc] initWithObjects:fr1,fr2, nil];
        //相加
        Fraction *fr = [fr1 sumNumber:fr2];
        NSLog(@"%ld/%ld", fr.member, fr.denominator);
        //相减
        Fraction *fra = [fr1 reduceNumber:fr2];
        NSLog(@"%ld/%ld", fra.member,fra.denominator);
        //相乘
        Fraction *fra1 = [fr1 rideNumber:fr2];
        NSLog(@"%ld/%ld", fra1.member,fra1.denominator);
        //相除
        Fraction *fra2 = [fr1 divideNumber:fr2];
        NSLog(@"%ld/%ld", fra2.member,fra2.denominator);
    }
    return 0;
}
